package com.power.sifa.correction.model.enumeration;

import lombok.Getter;

/**
 * @ClassName Tp_crc_areatypeEnum
 * @Author xiongzw
 * @Date 2024/1/15 14:38
 * @Description
 * @Version: 1.0
 **/

@Getter
public enum Tp_crc_areatypeEnum {

    SCHOOL(Tp_crc_areatype.SCHOOL, "学校","学校"),
    REGION(Tp_crc_areatype.REGION, "行政区域","行政区域"),
    HOSPITAL(Tp_crc_areatype.HOSPITAL, "医院","医院"),
    TRAFFIC(Tp_crc_areatype.TRAFFIC, "交通枢纽","交通枢纽"),
    GOVERNMENT(Tp_crc_areatype.GOVERNMENT, "政府机关","政府机关"),
    OTHER(Tp_crc_areatype.OTHER, "其他场所","其他场所");

    /**
     * id
     */
    private Integer id;

    /**
     * 名称
     */
    private String name;

    /**
     * 描述
     */
    private String desc;

    Tp_crc_areatypeEnum(Integer id, String name, String desc) {
        this.id = id;
        this.name = name;
        this.desc = desc;
    }

    public static Tp_crc_areatypeEnum getById(Integer id) {
        Tp_crc_areatypeEnum[] ruleEnums = Tp_crc_areatypeEnum.values();
        for (Tp_crc_areatypeEnum rule : ruleEnums) {
            if (rule.getId().equals(id)) {
                return rule;
            }
        }
        return null;
    }
}
